package models;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 关注 - 被关注
 * 
 * @author 李宇星 24/1/2015
 */
@Entity
@Table(name = "concern")
public class Concern extends BasicModel{
	//关注人的ID
	@Column(name = "concernId")
	public String concernId;
	
	//被关注人的ID
	@Column(name = "beConcernId")
	public String beConcernId;
	
	public static Concern findByTwoId(String userId,String beConcernId)
	{
		return Concern.find("concernId = ? and beConcernId = ?", userId,beConcernId).first();
	}
	
}
